package hanxx.test.two;

/**
 * @edit:韩鑫鑫
 * @Date: 2022/11/18/14:18
 * @Description:
 */
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;

import org.quartz.Job;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.quartz.SchedulerException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class HelloJob implements Job {

//    private static final Logger LOGGER =  LoggerFactory.getLogger(HelloJob.class);

    @Override
    public void execute(JobExecutionContext context)
            throws JobExecutionException {
        /*try {
            LOGGER.info(context.getScheduler().getSchedulerName());
            String jobParam = (String) context.getJobDetail().getJobDataMap().get("jobParam");
            if (jobParam != null) {
                LOGGER.info(jobParam.toString());
            }
            LOGGER.info(Integer.toString(Calendar.getInstance().get(Calendar.SECOND)));
        } catch (SchedulerException e) {
            e.printStackTrace();
        }*/
        SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        String format = simpleDateFormat.format(new Date());
        System.err.println("时间是"+format);
    }

}